<%@page import="javax.servlet.http.Cookie"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ include file="/common.jsp" %>

<!DOCTYPE html>
<html>
  <head>
  	<meta charset="UTF-8">
	<title>Cookie</title>
	<style>
		*{
			font-size: 14px;
			font-family: "微软雅黑";
		}
		
		span{
			color:red;
		}
	</style>
   </head>
  
  <body>
  	Cookie: 
  	<span>
  		<%
  			String lastTime    = session.getAttribute("lastTime").toString();;
  		    String currentTime = session.getAttribute("currentTime").toString();
  		    if(lastTime.equals(currentTime)){
  		    	response.getWriter().write("您是第一次访问本站");
  		    }else{
  		    	response.getWriter().write("您上一次访问本站的时间是"+lastTime);
  		    }
  		%>
  	</span>	
  </body>
</html>
